﻿@model IEnumerable<KRM.Core.KRMSP_advancedSearch_Result>

@if (Model.Any())
{
    <table class="table table-bordered table-fix krmtable" data-height="500px">
        <thead>
            <tr>
                <th></th>
                <th>OrderRef</th>
                <th>CompanyName</th>
                <th>ProductName</th>
                <th>ProductOption</th>
                <th>DatePlaced</th>
                <th>ForeName</th>
                <th>Surname</th>
                <th>ItemCancelled</th>
                <th>Telephone1</th>
                <th>EmailAddress</th>
                <th>ItemPrice</th>
                <th>OrderValue</th>
                <th>OrderItemID</th>
                <th>CancellationID</th>
                <th>Postcode</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model)
            {
                <tr>
                    <td><a href="/orderview/orderdetail?orderref=@item.OrderRef" target="_blank">View order</a></td>
                    <td>@item.OrderRef</td>
                    <td>@item.CompanyName</td>
                    <td>@item.ProductName</td>
                    <td>@item.ProductOption</td>
                    <td>@item.DatePlaced</td>
                    <td>@item.ForeName</td>
                    <td>@item.Surname</td>
                    <td>@item.ItemCancelled</td>
                    <td>@item.Telephone1</td>
                    <td>@item.EmailAddress</td>
                    <td>@item.ItemPrice</td>
                    <td>@item.OrderValue</td>
                    <td>@item.OrderItemID</td>
                    <td>@item.CancellationID</td>
                    <td>@item.Postcode</td>
                </tr>
            }
        </tbody>
    </table>
}
else
{
    @Html.Partial("Partial/_MessageResult")
}
